package com.hb0730.boot.admin.modules.sci.model.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 科研人才团队表
 * @TableName sci_management_team
 */
@TableName(value ="sci_management_team")
@Data
public class SciManagementTeam implements Serializable {
    /**
     * id
     */
    @TableId(type = IdType.ASSIGN_ID)
    private String id;

    /**
     * 负责人
     */
    private String author;

    /**
     * 院系部门
     */
    private String department;

    /**
     * 类别
     */
    private String type;

    /**
     * 团队名称
     */
    private String title;

    /**
     * 项目编号
     */
    private String teamNumber;

    /**
     * 来源或分类
     */
    private String teamType;

    /**
     * 项目级别
     */
    private String level;

    /**
     * 资助总额
     */
    private String supportBudget;

    /**
     * 批准部门
     */
    private String teamSource;

    /**
     * 获批时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime teamTime;

    /**
     * 项目路径
     */
    private String path;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime modified;

    /**
     * 备注
     */
    private String remark;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SciManagementTeam other = (SciManagementTeam) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getAuthor() == null ? other.getAuthor() == null : this.getAuthor().equals(other.getAuthor()))
            && (this.getDepartment() == null ? other.getDepartment() == null : this.getDepartment().equals(other.getDepartment()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle()))
            && (this.getTeamNumber() == null ? other.getTeamNumber() == null : this.getTeamNumber().equals(other.getTeamNumber()))
            && (this.getTeamType() == null ? other.getTeamType() == null : this.getTeamType().equals(other.getTeamType()))
            && (this.getLevel() == null ? other.getLevel() == null : this.getLevel().equals(other.getLevel()))
            && (this.getSupportBudget() == null ? other.getSupportBudget() == null : this.getSupportBudget().equals(other.getSupportBudget()))
            && (this.getTeamSource() == null ? other.getTeamSource() == null : this.getTeamSource().equals(other.getTeamSource()))
            && (this.getTeamTime() == null ? other.getTeamTime() == null : this.getTeamTime().equals(other.getTeamTime()))
            && (this.getPath() == null ? other.getPath() == null : this.getPath().equals(other.getPath()))
            && (this.getModified() == null ? other.getModified() == null : this.getModified().equals(other.getModified()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getAuthor() == null) ? 0 : getAuthor().hashCode());
        result = prime * result + ((getDepartment() == null) ? 0 : getDepartment().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
        result = prime * result + ((getTeamNumber() == null) ? 0 : getTeamNumber().hashCode());
        result = prime * result + ((getTeamType() == null) ? 0 : getTeamType().hashCode());
        result = prime * result + ((getLevel() == null) ? 0 : getLevel().hashCode());
        result = prime * result + ((getSupportBudget() == null) ? 0 : getSupportBudget().hashCode());
        result = prime * result + ((getTeamSource() == null) ? 0 : getTeamSource().hashCode());
        result = prime * result + ((getTeamTime() == null) ? 0 : getTeamTime().hashCode());
        result = prime * result + ((getPath() == null) ? 0 : getPath().hashCode());
        result = prime * result + ((getModified() == null) ? 0 : getModified().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", author=").append(author);
        sb.append(", department=").append(department);
        sb.append(", type=").append(type);
        sb.append(", title=").append(title);
        sb.append(", teamNumber=").append(teamNumber);
        sb.append(", teamType=").append(teamType);
        sb.append(", level=").append(level);
        sb.append(", supportBudget=").append(supportBudget);
        sb.append(", teamSource=").append(teamSource);
        sb.append(", teamTime=").append(teamTime);
        sb.append(", path=").append(path);
        sb.append(", modified=").append(modified);
        sb.append(", remark=").append(remark);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}